<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:c="http://java.sun.com/jstl/core"
	  xmlns:p="http://primefaces.org/ui"
	  lang="pt-br">
    <body>
        
        <ui:composition template="template/template.xhtml">
            
            <ui:define name="titulo">
                Usuario Cadastrado
            </ui:define>

            <ui:define name="conteudo">
    			<p:panel header="Meu Cadastro">
	    	       <h:panelGrid columns="2" cellpadding="5">
		    	        <h:outputText value="E-mail:" />
						<p:inputText id="email"
							value="#{usuarioController.usuario.email}" required="true"
							validator="#{usuarioController.validaEmail}"
							requiredMessage="E-mail obrigatorio">
						</p:inputText>
		    	       
		    	        <h:outputText value="Senha:" />
						<p:password id="senha"
							value="#{usuarioController.usuario.senha}" required="true"
							requiredMessage="Senha obrigatoria" feedback="false">
						</p:password>
						
		    	       
		    	       <f:facet name="footer">
							<p:commandButton id="action" value="Login"
								action="#{usuarioController.login}" ajax="false" />
							<p:commandButton id="novo" value="Novo Usuario" 
								action="#{usuarioController.novoUsuario}"
								ajax="false" immediate="true" />
						</f:facet>
			    	</h:panelGrid>
    			</p:panel>
    
            </ui:define>

        </ui:composition>
        
    </body>
</html>
